package net.comm.group.web.form;

import net.comm.page.PageCtr;

import org.apache.struts.action.*;
import org.apache.struts.upload.FormFile;


public class GForumForm extends ActionForm {

	private static final long serialVersionUID = 1L;
	private static final String KEY_SPLIT = "#,##,#,#,#";

	private String  QryOrderby;			//	
	private String  QryDesc;			//	
	private String  Isradnom = "";		//是否随机显示	
	
	private int  QryGroupID;		//群组ID
	private int  QryVillageID;		//社区ID
	private int  QryGForumID;	//
	private String  QryTitle;		//标题
	private int  QryUserID;		//
	private int  	QryFirsort;	//分类一

	private int  GForumID;	//
	private int  GroupID;	//群组ID
	private int  VillageID;		//社区ID
	private String  Title;		//标题
	private String  Author;		//作者
	private String  Frsource;	//来源
	private String  Content;	//发贴/跟贴内容
	private String  Intro;		//内容简介
	private int  	FileID;		//附件ID
	private int  	Firsort;	//分类一
	private int  	Secsort;	//
	private int  	Thisort;	//
	private String  Status;		//帖子状态
	private String  Type;		//帖子类型
	private String  Up;			//帖子是否置顶
	private String  Good;		//帖子是否加精
	private int  UpCnt;			//顶的总数
	private int  DownCnt;		//踩的总数
	private String  Tags;		//关键词
	private int  	Attachcnt;	//点击次数
	private int  	Replycnt;	//回复次数
	private String  Ctime;		//
	private int  UserID;		//
	private String  IP;		//
	private int  RepuserID;	//
	private String  Mtime;		//
	
	private FormFile  Filepath;		//
			
	private String action = "";
	
	public GForumForm() {
		super();
		// TODO Auto-generated constructor stub		
		Clear();		
	}
	public void Clear() {
		
		QryGroupID = 0;
		QryVillageID = 0;
		QryGForumID = 0;
		QryOrderby = "";
		Isradnom = "";
		QryTitle = "";
		QryFirsort = 0;
		QryUserID = 0;
		QryDesc = "";
		
		GForumID = 0;		//
		GroupID = 0;		//群组ID
		VillageID = 0;		//社区ID
		Title = "";		//标题
		Author = "";		//作者
		Frsource = "";	//来源
		Content = "";	//发贴/跟贴内容
		Intro = "";		//内容简介
		FileID = 0;		//附件ID
		Firsort = 0;		//分类一
		Secsort = 0;	//
		Thisort = 0;	//
		Status = "";		//帖子状态
		Type = "";		//帖子类型
		Up = "";			//帖子是否置顶
		Good = "";		//帖子是否加精
		UpCnt = 0;
		DownCnt = 0;
		Tags = "";		//关键词
		Attachcnt = 0;	//点击次数
		Replycnt = 0;	//回复次数
		Ctime = "";		//
		UserID = 0;		//
		IP = "";		//
		RepuserID = 0;	//
		Mtime = "";		//	
		Filepath = null;
	}
	/**
	 * 查询当前页主键值串
	 */
	private String key = "";

	/**
	 * 查询上上页主键值串
	 */
	private String lastKey = "";
	

	/**
	 * 分页控制对象
	 */
	private PageCtr page;
	



	public PageCtr getPage() {
		return page;
	}

	public void setPage(PageCtr page) {
		this.page = page;
	}
	
	/**
	 * @param key the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String[] array) {
		if(key != null && key.trim().length() > 0) {
			key = "";
		}
		
		StringBuffer keyBuff = new StringBuffer();
		for (int i = 0; i < array.length; i++) 
		{
			/**
			 * 防止空字符串引起的split方法异常
			 */
			if(array[i] == null || array[i].length() == 0) {
				keyBuff.append(" ");
			} else {
				keyBuff.append(array[i]);
			}
			
			keyBuff.append(KEY_SPLIT);
		}
		
		key = keyBuff.toString();		
	}
	
	/**
	 * 获取lastKey值
	 * @return
	 */
	public String[] lastKey()
	{
		if(lastKey == null || lastKey.trim().length() == 0) {
			return null;
		}
		
		return lastKey.split(KEY_SPLIT);
	}
	
	public String getLastKey() {
		return lastKey;
	}

	public void setLastKey(String lastKey) {
		this.lastKey = lastKey;
	}	

	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}

	public static String getKEY_SPLIT() {
		return KEY_SPLIT;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}


	public String getTitle() {
		return Title;
	}

	public String getAuthor() {
		return Author;
	}

	public String getFrsource() {
		return Frsource;
	}

	public String getContent() {
		return Content;
	}



	public int getFirsort() {
		return Firsort;
	}

	public int getSecsort() {
		return Secsort;
	}

	public int getThisort() {
		return Thisort;
	}

	public String getStatus() {
		return Status;
	}

	public String getType() {
		return Type;
	}

	public String getTags() {
		return Tags;
	}

	public int getAttachcnt() {
		return Attachcnt;
	}

	public int getReplycnt() {
		return Replycnt;
	}



	public void setTitle(String title) {
		Title = title;
	}

	public void setAuthor(String author) {
		Author = author;
	}

	public void setFrsource(String frsource) {
		Frsource = frsource;
	}

	public void setContent(String content) {
		Content = content;
	}



	public void setFirsort(int firsort) {
		Firsort = firsort;
	}

	public void setSecsort(int secsort) {
		Secsort = secsort;
	}

	public void setThisort(int thisort) {
		Thisort = thisort;
	}

	public void setStatus(String status) {
		Status = status;
	}

	public void setType(String type) {
		Type = type;
	}

	public void setTags(String tags) {
		Tags = tags;
	}

	public void setAttachcnt(int attachcnt) {
		Attachcnt = attachcnt;
	}

	public void setReplycnt(int replycnt) {
		Replycnt = replycnt;
	}



	public int getQryVillageID() {
		return QryVillageID;
	}
	public int getVillageID() {
		return VillageID;
	}
	public String getCtime() {
		return Ctime;
	}
	public void setQryVillageID(int qryVillageID) {
		QryVillageID = qryVillageID;
	}
	public void setVillageID(int villageID) {
		VillageID = villageID;
	}
	public void setCtime(String ctime) {
		Ctime = ctime;
	}
	public String getIP() {
		return IP;
	}

	public void setIP(String ip) {
		IP = ip;
	}


	public String getUp() {
		return Up;
	}

	public String getGood() {
		return Good;
	}

	public void setUp(String up) {
		Up = up;
	}

	public void setGood(String good) {
		Good = good;
	}

	public String getMtime() {
		return Mtime;
	}
	public void setMtime(String mtime) {
		Mtime = mtime;
	}
	public int getQryGroupID() {
		return QryGroupID;
	}
	public int getQryGForumID() {
		return QryGForumID;
	}
	public int getGForumID() {
		return GForumID;
	}
	public int getGroupID() {
		return GroupID;
	}
	public int getUserID() {
		return UserID;
	}
	public int getRepuserID() {
		return RepuserID;
	}

	public void setQryGroupID(int qryGroupID) {
		QryGroupID = qryGroupID;
	}
	public void setQryGForumID(int qryGForumID) {
		QryGForumID = qryGForumID;
	}
	public void setGForumID(int forumID) {
		GForumID = forumID;
	}
	public void setGroupID(int groupID) {
		GroupID = groupID;
	}
	public void setUserID(int userID) {
		UserID = userID;
	}
	public void setRepuserID(int repuserID) {
		RepuserID = repuserID;
	}
	public String getQryOrderby() {
		return QryOrderby;
	}
	public void setQryOrderby(String qryOrderby) {
		QryOrderby = qryOrderby;
	}
	public String getIsradnom() {
		return Isradnom;
	}
	public void setIsradnom(String isradnom) {
		Isradnom = isradnom;
	}

	public String getIntro() {
		return Intro;
	}
	public int getFileID() {
		return FileID;
	}
	public FormFile getFilepath() {
		return Filepath;
	}
	public void setIntro(String intro) {
		Intro = intro;
	}
	public void setFileID(int fileID) {
		FileID = fileID;
	}
	public void setFilepath(FormFile filepath) {
		Filepath = filepath;
	}
	public String getQryTitle() {
		return QryTitle;
	}
	public void setQryTitle(String qryTitle) {
		QryTitle = qryTitle;
	}
	public int getQryFirsort() {
		return QryFirsort;
	}
	public void setQryFirsort(int qryFirsort) {
		QryFirsort = qryFirsort;
	}
	public int getUpCnt() {
		return UpCnt;
	}
	public int getDownCnt() {
		return DownCnt;
	}
	public void setUpCnt(int upCnt) {
		UpCnt = upCnt;
	}
	public void setDownCnt(int downCnt) {
		DownCnt = downCnt;
	}
	public int getQryUserID() {
		return QryUserID;
	}
	public void setQryUserID(int qryUserID) {
		QryUserID = qryUserID;
	}
	public String getQryDesc() {
		return QryDesc;
	}
	public void setQryDesc(String qryDesc) {
		QryDesc = qryDesc;
	}


	
}